import babelpolyfill from 'babel-polyfill';
import Vue from 'vue';
import App from './App';
import axios from 'axios';
import iView from 'iview';
import components from '../../components/'; //加载公共组件
import i18n from '../../components/i18n/i18n.js';
//定制皮肤
import '../../assets/theme/dark.less';
import '../../assets/css/base.css'

Vue.use(iView);

//注册公共组件
Object.keys(components).forEach((key) => {
    var name = key.replace(/(\w)/, (v) => v.toUpperCase()) //首字母大写
//  console.log(`ws${name}`);
    Vue.component(`ws${name}`, components[key])
});

//注册VUE全局对象
Vue.prototype.axios = axios;

new Vue({
    el: '#app',
    i18n,
    render: h => h(App)
});

